package com.tuanbiao.controllers;

import com.hzjq.core.bean.Param;
import com.hzjq.data.entity.BlastLonLat;
import com.hzjq.data.entity.BlastServiceBean;
import com.hzjq.data.entity.ZbServiceEntity;
import com.hzjq.data.hzjq.entity.DeviceInfoEntity;
import com.tuanbiao.base.mvp.IModel;
import com.tuanbiao.base.mvp.IPresenter;
import com.tuanbiao.base.mvp.IView;
import com.tuanbiao.constants.SettingType;
import com.tuanbiao.constants.UserConstants;
import com.tuanbiao.data.entity.ZBServiceItem;
import com.tuanbiao.models.action.DeviceInfoAction;
import com.tuanbiao.models.action.HttpAction;
import com.tuanbiao.models.action.LocationAction;
import com.tuanbiao.models.action.LoginAction;
import com.tuanbiao.models.action.LoginSurplusAction;
import com.tuanbiao.models.action.SettingAction;
import com.tuanbiao.models.action.UploadAction;

import java.util.List;

/**
 * @author abiao
 * @since 2022/4/15 15:25
 */
public interface SettingController {
    interface Model extends IModel, SettingAction, DeviceInfoAction, LocationAction, HttpAction, LoginSurplusAction, LoginAction, UploadAction {

    }

    interface View extends IView {

        void showWorkModel(String workModeName);

        void showControlPanelChange(boolean show);

        void showWorkModelChange(boolean show);

        void showServerChange(boolean show);

        void showLocalChange(boolean show);

        void showDeviceNumChange(boolean show);

        void showLoginTime(String time);

        void startLogin();

        void startChangeDeviceNum();

        void startChangeService();
    }

    interface Presenter extends IPresenter {

        void toggleModel();

        void toggleLoginTime();

        void logout();

        void checkPassword(String content, String password, SettingType type);

        String getPassword();


    }

    interface DeviceInfoView extends IView {
        void showDeviceInfo(DeviceInfoEntity entity);
    }

    interface DeviceInfoPresenter extends IPresenter {

    }


    interface MoreView extends IView {
        void showMaxDetonator(String maxDetonator);

        void showMaxDelay(String maxDelay);

        void showModel(boolean model);

        void showSetting(boolean showControlPanel, boolean showChangeModel, boolean showServerChange, boolean showChangeDeviceNum, boolean showLocalChange);

        void showForceBlastCheck(boolean isCheck);

        void showForceAuthCheck(boolean isCheck);

        void showAllowPartNetted(boolean isCapCountNotMatchAllowAdopt);

        void startLogin();

    }

    interface MorePresenter extends IPresenter {

        void setMaxDetonator(String maxDetonator);

        void setMaxDelay(String maxDelay);

        void setModel(boolean keep, boolean isStandAloneModel);

        void setShowControlPanel(boolean show);

        void setShowChangeModel(boolean show);

        void setShowChangeServer(boolean show);

        void setShowChangeDeviceNum(boolean show);

        void setShowChangeLocal(boolean show);

        void changePartNetted(boolean b);

        void changeForceBlast(boolean check);

        void changeForceAuth(boolean check);

    }

    interface ControlPanelView extends IView {
        void showSettingParams(Param param);
    }

    interface ControlPanelPresenter extends IPresenter {
        void getSettingParams();

        void setSettingParams(String connectVoltage, String chargeVoltage, String queryVoltage, String chargeAdc, String outageDelay, String groupingCount, String groupingInterval, String singleCheck, String reservedOne, String reservedTwo, String reservedThree, String reservedFour);


    }

    interface LocationView extends IView {

        void showDetails(boolean enablePseudoMode, BlastLonLat pseudoLonLat);
    }

    interface LocationPresenter extends IPresenter {

        void save(boolean use, String latitude, String longitude);
    }

    interface DeviceView extends IView {

        void showDeviceNum(String num);

        void showModel(boolean isStandAloneModel);

        void startLogin();

        void startMain();

        void showType(@UserConstants.KeyEventUserType int type);
    }

    interface DevicePresenter extends IPresenter {

        void setModel(boolean keep, boolean isStandAloneModel);
    }

    interface DeviceNumView extends IView {

        void showDeviceNum(String num, boolean enable);
    }

    interface DeviceNumPresenter extends IPresenter {
        void changeNum(boolean use, String content);

        void reset();

    }

    interface ChangeServiceView extends IView {

        void showServices(List<BlastServiceBean> allUploadService);
    }

    interface ChangeServicePresenter extends IPresenter {
        void changeServices(List<BlastServiceBean> data);
    }

    interface ZbServerChangeView extends IView {
        void showServices(ZBServiceItem entity);

        void showSelectDialog(List<ZBServiceItem> items, int selectPosition);
    }

    interface ZbServerChangePresenter extends IPresenter {
        void setNewZbIp(List<ZbServiceEntity> data);

        void insertZbService(ZBServiceItem entity);

        void selectService(ZBServiceItem entity);

        void updateZbService(ZBServiceItem zbServiceItem);

        void removeZBIp();

        void showServiceSelect();

    }
}
